package com.keyancompany.zhongbaopingtai.weight;

import android.content.Context;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.keyancompany.zhongbaopingtai.R;
import com.keyancompany.zhongbaopingtai.adapter.IndexTeamAdapter;
import com.keyancompany.zhongbaopingtai.fragment.TeamFragment;
import com.keyancompany.zhongbaopingtai.utils.ScreenUtils;

/**
 * Created by firefox on 2016/7/2.
 */
public class AuthorPopup extends MenuPopuWindow {

    private TextView single, company;

    public AuthorPopup(Context context) {
        super(context);
    }


    @Override
    public void setUpViews() {
        single = (TextView) findViewById(R.id.single_author);
        company = (TextView) findViewById(R.id.company_author);
    }

    @Override
    public void setUpListener() {

        single.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cliclSureListener != null)
                    cliclSureListener.clickSureLinstener("single");
            }
        });
        company.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cliclSureListener != null)
                    cliclSureListener.clickSureLinstener("company");
            }
        });
    }

    @Override
    public int getAnimationStyle() {
        return 0;
    }

    @Override
    public int getResView() {
        return R.layout.popup_author;
    }

    @Override
    public void updateView(View contentView) {
        setWidth(ScreenUtils.getScreenWidth(context) * 2 / 3);
    }
}
